#ifndef QD3DUTILSTEXEXT_H
#define QD3DUTILSTEXEXT_H
#include "qd3d_global.h"
#include "QD3DUtils.h"
#include <QImage>

class QD3D_EXPORT QD3DUtilsTexExt : public QD3DUtils
{
public:
	QD3DUtilsTexExt ();
	QD3DUtilsTexExt (QD3DContext *pContext);
	~QD3DUtilsTexExt ();

	ID3D11Texture2D *createTexture2DFromQImage (const QImage& image, UINT bindFlag);
	void updateTexture2D (ID3D11Texture2D *pDstDxTex, QImage& image);
	void downloadTexture2D (ID3D11Texture2D *p_dxTex, QImage& image);
	void getRenderTexture (QImage& image);
private:
	
	bool _getDxTexDataFromQImage (const QImage& image, uchar **ppOutTexData,
			UINT *pOutLineBytes, DXGI_FORMAT *pOutFormat);
};

#endif // QD3DUTILSCVEXT_H
